﻿<div class="layui-card">
    <div class="layui-card-body">
        <form class="layui-form">
            <div class="layui-form-item">
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">图书室</label>
                    <div class="layui-input-inline">
                        <input type="text" id="key" placeholder="请输入图书室名称" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <a class="pear-btn pear-btn-md pear-btn-primary" id="search">
                        <i class="layui-icon layui-icon-search"></i>
                        查询
                    </a>
                    <button type="reset" class="pear-btn pear-btn-md">
                        <i class="layui-icon layui-icon-refresh"></i>
                        重置
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>

<div class="layui-card">
    <div class="layui-card-body">
        <table id="dataTable" lay-filter="dataTable"></table>
    </div>
</div>
<div class="layui-hide">
    <div class="layer-close-mask drawer">
        <i class="iconfont icon-close3" id="btnClose"></i>
        <form class="layui-form" action="" lay-filter="form">
            <div class="main-container">
                <input type="hidden" id="id" name="id" value="0" />
                <div class="layui-form-item">
                    <label class="layui-form-label">名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="name" id="name" autocomplete="off" placeholder="请输入图书室名称" class="layui-input" lay-verify="required">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">编号</label>
                    <div class="layui-input-block">
                        <input type="text" name="code" id="code" autocomplete="off" placeholder="请输入图书室编号" class="layui-input" lay-verify="required">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">位置</label>
                    <div class="layui-input-block">
                        <input type="text" name="location" autocomplete="off" placeholder="请输入图书室位置" class="layui-input" lay-verify="required">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">状态</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="isOpen" lay-skin="switch" checked lay-text="开室|闭室">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">书架</label>
                    <div class="layui-input-block">
                        <div class="layui-input-inline w-100">
                            <input type="text" name="prefix" id="prefix" placeholder="前缀" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline middle">
                            <input type="checkbox" name="middle" id="middle" lay-filter="middle" lay-skin="switch" checked lay-text="数字|字母">
                        </div>
                        <div class="layui-input-inline w-100">
                            <input type="text" name="suffix" id="suffix" placeholder="后缀" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline w-100">
                            <input type="number" min=0 step=1 max=26 name="count" id="count" placeholder="数量" autocomplete="off" class="layui-input">
                        </div>
                        <div class="layui-input-inline">
                            <button type="button" id="createShelf" class="pear-btn pear-btn-primary">创建书架</button>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <div class="layui-btn-container tag" id="shelf" lay-filter="shelf" lay-allowclose="true">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="pear-btn pear-btn-primary" lay-submit lay-filter="submit">立即提交</button>
                        <button type="button" id="reset" class="layui-btn layui-btn-warm">重置</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<script type="text/html" id="toolbar">
    <button class="pear-btn pear-btn-primary pear-btn-md" lay-event="add">
        <i class="layui-icon layui-icon-add-1"></i>
        新增
    </button>
</script>
<script type="text/html" id="rowbar">
    <a title="编辑" class="pear-btn pear-btn-primary pear-btn-md" lay-event="edit">
        <i class="layui-icon layui-icon-edit"></i>
    </a>
      <a title="删除" class="pear-btn pear-btn-danger pear-btn-md" lay-event="delete">
        <i class="layui-icon layui-icon-delete"></i>
    </a>
</script>